.no-select() {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}
.center() {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.size(@w, @h) {
  width: @w;
  height: @h;
}
.ellipsisNum(@number: 1) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  word-break: break-all;
  text-overflow: ellipsis;
  -webkit-line-clamp: @number;
}
//文字一行超出显示省略号
.ellipsis (@substract:0) {
  //`@substract`单位为%
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: @substract;
}
// 清除浮动
.clearfix() {
  *zoom: 1;
  &:before,
  &:after {
    content: '';
    display: table;
  }
  &:after {
    clear: both;
    overflow: hidden;
  }
}
// 吸底导航
.fix-footer(@h: 70px) {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: @h;
  z-index: 1000;
}
// 隔行换色
.zebra-lists(@evenColor, @evenBgColor, @oddColor, @oddBgColor) {
  &:nth-child(2n) {
    color: @evenColor;
    background-color: @evenBgColor;
  }
  &:nth-child(2n + 1) {
    color: @oddColor;
    background-color: @oddBgColor;
  }
}
// 首字下沉
.first-letter(@font-size: 6em) {
  &::first-letter {
    float: left;
    line-height: 1;
    font-size: @font-size;
  }
}
// 渐变
.gradient(@dir: 0deg; @colors; @prefixes: webkit, moz, ms, o; @index: length(@prefixes)) when (@index > 0) {
  .gradient(@dir; @colors; @prefixes; (@index - 1));
  @prefix:extract (@prefixes, @index);
  @dir-old:90 - (@dir);
  background-image: ~'-@{prefix}-linear-gradient(@{dir-old}, @{colors})';
  & when ( @index = length(@prefixes) ) {
    background-image: ~'linear-gradient(@{dir}, @{colors})';
  }
}
// .gradient(90deg, #FFAA64, #FFCD73);
.flex-column() {
  display: flex;
  flex-direction: column;
}
// Flexbox Toolkit
.flex-center() {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-center-column() {
  .flex-center();
  flex-direction: column;
}
.flex-center-vert() {
  display: flex;
  align-items: center;
}
.flex-center-horiz() {
  display: flex;
  justify-content: center;
}
